package com.test.ribbon.controller;

import com.test.ribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloConrtroller {
    @Autowired
    HelloService helloService;

    @RequestMapping(value = "/hi")
    public String home(@RequestParam(value = "/name",defaultValue =  "无名")String name){
        return helloService.hi(name);
    }

}
